# Copyright (c) 2013 HomeAway, Inc.
# All rights reserved.  http://www.homeaway.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Modeled after the bundler gem_tasks gem_helper class.
# Now all that's required is a: require 'pom-loader/tasks' to bring in the tasks.
require 'pom-loader'

module PomLoader
  class Tasks
    include Rake::DSL if defined? Rake::DSL

    class << self
      def install_tasks(opts = {})
        new.install
      end
    end

    def install
      desc 'Generate and gather all of the files required for PomLoader'
      namespace :pom_loader do
        task :load do |t|
          PomLoader.load
        end
      end
    end
  end
end

PomLoader::Tasks.install_tasks
